#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <stdlib.h>
void handler(int signo)
{
  printf("get a signal: signal no is:%d\n",signo , getpid());
}


int main()
{
  //replace 2 signal
  int i = 0;
  for(i = 0; i < 32; i++)
  {
     signal(i , handler);
  }


  while(1)
  {
    printf("hello world! my pid is : %d\n" , getpid());
    sleep(3);
  }
  return 0;
}
